<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            list-style: none;
        }
        div{
            width: 750px;
            margin: 0 auto;
        }
        ul{
            display: flex;
        }
        ul > li{
            width: 70px;
            height: 250px;
            overflow: hidden;
            transition: width .2s linear;
        }
        img{
            display: block;
            width: 400px;
            height: 250px;
        }
        ol{
            display: flex;
        }
        ol > li{
            width: 10px;
            height: 10px;
            margin: 10px;
            background-color: aquamarine;
        }
        ol > li:first-child{
            background-color: red;
        }
    </style>
</head>
<body>
    <div>
        <ul>
            
        </ul>
        <ol>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
        </ol>
    </div>
    <script>
        //6.1
        var ul = document.querySelector("ul");
        //1.图片路径的前缀
        var str = "https://www.jq22.com/demo/jquerylbqh201910210040/images/0";
        // 4.声明一个空字符串用来叠加 多个li标签
        var str1 = "";
        // 2.循环创建多个li标签 带图的那个
        for (let i = 1; i <=6; i++) {
            //拼接路径
            var url = str + i + ".png"
            //5.叠加li
            str1 += `
        }
    </script>
</body>
</html>